#import "MessageTilingView-MyExtras.h"
#import "FunkyDog.h"
#import "ViewerPaneExtra.h"
#import <objc/objc.h>
#import <objc/objc-runtime.h>
#import <objc/objc-class.h>
@class ColorBackgroundView;

@implementation MessageTilingView(MyExtras)
+(void)load{
	if (self == [MessageTilingView class]){
		Method originalMethod ,replacedMethod;
		originalMethod  = class_getInstanceMethod(self, @selector(awakeFromNib));
		replacedMethod  = class_getInstanceMethod(self, @selector(myawakeFromNib));
		method_exchangeImplementations(originalMethod, replacedMethod);
		originalMethod  = class_getInstanceMethod(self, @selector(setBodyView:));
		replacedMethod  = class_getInstanceMethod(self, @selector(mysetBodyView:));
		method_exchangeImplementations(originalMethod, replacedMethod);
		NSLog(@"FunkySob goes Meeaou(%@)",[FunkySob sharedInstance]);
	}
}

-(void)myawakeFromNib{
	NSParameterAssert(_cmd == @selector(awakeFromNib));
	[self myawakeFromNib];
//	ViewerPaneExtra *vpe=[[ViewerPaneExtra alloc] init];
//	SGTagView *vtg=[vpe notesview];
// 	NSScrollView *scv=[self enclosingScrollView];
//	ColorBackgroundView *cbview=(ColorBackgroundView*)[scv superview];
//	NSRect o=[scv frame];
//	float _t=o.size.width- [vtg frame].size.width;
//	float x=NSHeight([cbview bounds]) + [cbview bounds].origin.y-[scv frame].size.height;
//	[vtg setFrame:NSMakeRect(_t,x,[vtg frame].size.width,[scv frame].size.height)];
//	[vtg setHidden:NO];
//	[vtg setNextKeyView:[scv nextKeyView]];
//	[cbview addSubview:vtg];
//	[scv setFrame:o];
//	[cbview setNeedsDisplay:YES];
}

-(void)mysetBodyView:(id)fp8{
	[self mysetBodyView:fp8];
}
@end

